import json

from ronglian_sms_sdk import SmsSDK

accId = '2c94811c9787a27f019831ba9f982421'
accToken = '89189e45f5cf4784b7cb540c9954bb9a'
appId = '2c94811c9787a27f019831baa14d2428'

def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = phone
    datas = (code,)
    resp = sdk.sendMessage(tid, mobile, datas)
    return json.loads(resp)